c# datetime remove days

62

c# datetime remove days -

// Just add the days you want to subtract as negatives
DateTime dateForButton = DateTime.Now.AddDays(-1);
// eg. DateTime.Now = 22.11.2021; DateTime.Now.AddDays(-1) = 21.11.2021

Comments

Submit
0 Comments